package elements;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

public class Element {
	protected int x;
	protected int y;
	protected BufferedImage icon;
	
	public Element(int x, int y){
		this.x = x;
		this.y = y;
	}

	public int getX() {
		return x;
	}
	public void setX(int x) {
		this.x = x;
	}
	public int getY() {
		return y;
	}
	public void setY(int y) {
		this.y = y;
	}
	public BufferedImage getIcon(){
		return icon;
	}
	protected void readIcon(String imageURL){
		try {
			this.icon = ImageIO.read(new File(imageURL));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
